1 Intention

This is the second part of the reproducible analysis supporting the findings of the manuscript entitled “Response diversity in the context of multifarious environmental change”. Here, we are going to produce the data necessary to reproduce the figures presented in the manuscript, and to analyse the relative results.

We hypothesised that multiple factors may shape response diversity in a multifarious environmental change context. Specifically, we are going to investigate whether the three following factors may drive response diversity: I. The relative strength of effect of different environmental drivers. II. Correlation in species’ responses to different environmental drivers. III. Mean value of environmental conditions.

Initially, we also hypothesised that the different correlation scenarios of temperature and salinity change over time may be driving response diversity. However, after thinking and discussing the hypothesis, we concluded that there was no reason to believe that. Yet, we used different correlation scenarios in salinity and temperature change in the simulation to show that our results are robust to every kind of environmental change scenario.

In this document, we first analyse the II and III determinants, and then we repeat the analysis in a case where temperature and salinity have exactly the same effect on species growth rate (determinant I).

For each community, we calculate first response capacity (with unknown direction of environmental change), and then also response diversity for each environmental change scenario. We here quantify directional response diversity also as dissimilarity. However, we decided to exclude this measurement of response diversity, as it does not correlate well with community stability, and it also shows to be dependent on the shape of species responses. In the manuscript, thus, we focus on divergence as main metric to measure directional response diversity.

Within the project “response diversity in the context of multifarious environmental change”, we have been simulating species response curves using the Eppley performance curve.

With one environmental variable, the performance (i.e., rate) is given by:

  • \(rate(E) = ae^{bE}(1 - (\frac{E - z}{w/2})^2)\)
  • \(E\) is the values of the environmental factor.
  • \(z\) controls location of maximum.
  • \(w\) controls range of \(E\) over which the rate is positive.
  • \(a\) scaling constant.
  • \(b\) controls rate of increase towards the maximum rate, as \(E\) increases.

Adding a second environmental variable gives:

\(rate(E_1, E_2) = a_1e^{b_1E_1}(1 - (\frac{E_1 - z_1}{w_1/2})^2) + a_2e^{b_2E_2}(1 - (\frac{E_2 - z_2}{w_2/2})^2)\)

We now want to assess the role of diversity in response to one (or both) environmental variable(s) influence response diversity.

To do that, we are going to manipulate amount of diversity in responses to one or both env variables among the species, and also the correlation in the tolerances (position of optima, determine by the terms z1 and z2 in the above formula). We will make scenarios of communities with diversity in response to only E1 (temperature), or both E1 (temperature) and E2 (salinity), with diversity in both that is positively correlated or negatively.

# Variation in diversity in z1

1.1 Increasing variance in z1 - negative correlation between env variables (E1 and E2) with fluctuations.

We now create 3 communities. Community 1 is characterized by low diversity in z1, community 2 has medium diversity in z1, and community 3 has high diversity in z1. z2 is constant in the 3 communities and fixed to a medium level of diversity.

E1 and E2 have negative correlation. We create 3 scenarios where we keep the variation of E1 and E2 fixed, but we change the mean so that in the first scenario E1 and E2 have low mean value, in the second medium, and high in the third (factor III).

1.1.1 Community 1 - low diversity in z1.

Community 1, single species responses. (a) Species responses to the gradient of temperature. Different colour lines show the dependency of the rate to the second environmental variable (salinity). (b) Species responses to the gradient of salinity. Different colour lines show the dependency of the rate to the second environmental variable (temperature).

(#fig:plotcomm1_neg)Community 1, single species responses. (a) Species responses to the gradient of temperature. Different colour lines show the dependency of the rate to the second environmental variable (salinity). (b) Species responses to the gradient of salinity. Different colour lines show the dependency of the rate to the second environmental variable (temperature).

1.1.2 Community 2 - medium diversity in z1.

Community 2, single species responses. (a) Species responses to the gradient of temperature. Different colour lines show the dependency of the rate to the second environmental variable (salinity). (b) Species responses to the gradient of salinity. Different colour lines show the dependency of the rate to the second environmental variable (temperature).

(#fig:plotcomm2_neg)Community 2, single species responses. (a) Species responses to the gradient of temperature. Different colour lines show the dependency of the rate to the second environmental variable (salinity). (b) Species responses to the gradient of salinity. Different colour lines show the dependency of the rate to the second environmental variable (temperature).

1.1.3 Community 3 - high diversity in z1.

 Community 3, single species responses. (a) Species responses to the gradient of temperature. Different colour lines show the dependency of the rate to the second environmental variable (salinity). (b) Species responses to the gradient of salinity. Different colour lines show the dependency of the rate to the second environmental variable (temperature).

(#fig:plotcomm3_neg) Community 3, single species responses. (a) Species responses to the gradient of temperature. Different colour lines show the dependency of the rate to the second environmental variable (salinity). (b) Species responses to the gradient of salinity. Different colour lines show the dependency of the rate to the second environmental variable (temperature).

1.1.4 Response Capacity

1.1.5 Position of the optimum

Here and elsewhere in this document, the position of the optima has been estimated as the environmental location (E1 and E2 values) for which the rate is maximum.

1.1.6 Response diversity calculation - first scenario (low mean values of E1 and E2)

1.2 Fluctuation in environmental change - positive correlation

Increasing variance in z1 - positive correlation between env variables (E1 and E2)

Same steps as before (3 communities with increasing diversity in z1 while z2 is fixed), but the correlation between E1 and E1 is positive

1.2.1 Response diversity calculation

1.3 Fluctuation in environmental change - no correlation

Increasing variance in z1 - no correlation between env variables (E1 and E2)

Same steps as before (3 communities with increasing diversity in z1 while z2 is fixed), but there is no correlation between E1 and E1

1.3.1 Response diversity calculation

1.4 preparing data set

2 Variation in diversity in z1 and z2

Now we do the same, but having also z2 changing together with z1 with positive correlation. So, diversity in z1 and z2 are increasing gradually from low to high in the 3 communities.

2.1 Fluctuation in environmental change - negative correlation

Increasing variance in z1 and z2 - negative correlation between environmental variables (E1 and E2).

We now create 3 communities. Community 1 is characterized by low diversity in z1 and z2, community 2 has medium diversity in z1 and z2, and community 3 has high diversity in z1 and z2.

E1 and E2 fluctuate with negative correlation.

2.1.1 Community 1 - low diversity in z1.

Community 1, single species responses. (a) Species responses to the gradient of E1. Different colour lines show the dependency of the rate to the second environmental variable (E2). (b) Species responses to the gradient of E2. Different colour lines show the dependency of the rate to the second environmental variable (E1).

(#fig:plotcomm1_pos)Community 1, single species responses. (a) Species responses to the gradient of E1. Different colour lines show the dependency of the rate to the second environmental variable (E2). (b) Species responses to the gradient of E2. Different colour lines show the dependency of the rate to the second environmental variable (E1).

2.1.2 Community 2 - medium diversity in z1.

Community 2, single species responses. (a) Species responses to the gradient of E1. Different colour lines show the dependency of the rate to the second environmental variable (E2). (b) Species responses to the gradient of E2. Different colour lines show the dependency of the rate to the second environmental variable (E1).

(#fig:plotcomm2_pos)Community 2, single species responses. (a) Species responses to the gradient of E1. Different colour lines show the dependency of the rate to the second environmental variable (E2). (b) Species responses to the gradient of E2. Different colour lines show the dependency of the rate to the second environmental variable (E1).

2.1.3 Community 3 - high diversity in z1.

 Community 3, single species responses. (a) Species responses to the gradient of E1. Different colour lines show the dependency of the rate to the second environmental variable (E2). (b) Species responses to the gradient of E2. Different colour lines show the dependency of the rate to the second environmental variable (E1).

(#fig:plotcomm3_pos) Community 3, single species responses. (a) Species responses to the gradient of E1. Different colour lines show the dependency of the rate to the second environmental variable (E2). (b) Species responses to the gradient of E2. Different colour lines show the dependency of the rate to the second environmental variable (E1).

2.1.4 Response Capacity

2.1.5 Position of the optimum

.

2.1.6 Response diversity calculation - first scenario (low mean values of E1 and E2)

2.2 Fluctuation in environmental change - positive correlation

Increasing variance in z1 and z2 - positive correlation between env variables (E1 and E2)

Same steps as before (3 communities with increasing diversity in z1 while z2 is fixed), but the correlation between E1 and E1 is positive

2.2.1 Response diversity calculation

2.3 Fluctuation in environmental change - no correlation

Increasing variance in z1 - no correlation between env variables (E1 and E2)

Same steps as before (3 communities with increasing diversity in z1 while z2 is fixed), but there is no correlation between E1 and E1

2.3.1 Response diversity calculation

2.4 Creating dataset

3 Variation in diversity in z1 and z2

Now we do the same, but having also z2 changing together with z1 with negative correlation. So, diversity in z1 is increasing gradually from low to high in the 3 communities, while z2 decreases gradually in the 3 communities.

3.1 fluctuation in environmental change - negative correlation

Increasing variance in z1 and z2 - negative correlation between env variables (E1 and E2).

We now create 3 communities. Community 1 is characterized by low diversity in z1 and high diversity in z2, community 2 has medium diversity in z1 and z2, and community 3 has high diversity in z1 and low in z2.

E1 and E2 have negative correlation.

3.1.1 Community 1 - low diversity in z1.

Community 1, single species responses. (a) Species responses to the gradient of E1. Different colour lines show the dependency of the rate to the second environmental variable (E2). (b) Species responses to the gradient of E2. Different colour lines show the dependency of the rate to the second environmental variable (E1).

(#fig:plotcomm1_mix)Community 1, single species responses. (a) Species responses to the gradient of E1. Different colour lines show the dependency of the rate to the second environmental variable (E2). (b) Species responses to the gradient of E2. Different colour lines show the dependency of the rate to the second environmental variable (E1).

3.1.2 Community 2 - medium diversity in z1.

Community 2, single species responses. (a) Species responses to the gradient of E1. Different colour lines show the dependency of the rate to the second environmental variable (E2). (b) Species responses to the gradient of E2. Different colour lines show the dependency of the rate to the second environmental variable (E1).

(#fig:plotcomm2_mix)Community 2, single species responses. (a) Species responses to the gradient of E1. Different colour lines show the dependency of the rate to the second environmental variable (E2). (b) Species responses to the gradient of E2. Different colour lines show the dependency of the rate to the second environmental variable (E1).

3.1.3 Community 3 - high diversity in z1.

 Community 3, single species responses. (a) Species responses to the gradient of E1. Different colour lines show the dependency of the rate to the second environmental variable (E2). (b) Species responses to the gradient of E2. Different colour lines show the dependency of the rate to the second environmental variable (E1).

(#fig:plotcomm3_mix) Community 3, single species responses. (a) Species responses to the gradient of E1. Different colour lines show the dependency of the rate to the second environmental variable (E2). (b) Species responses to the gradient of E2. Different colour lines show the dependency of the rate to the second environmental variable (E1).

3.1.4 Response Capacity

3.2 Potential response diveristy across scenarios - here we create the data set to campare the Response Capacity in the three different scenarios we created above. That is, we compare potential dissimilarity and divergence in communities changing only in z1, in communities changing in z1 and z2 with positive correlation, and communities changing in z1 and z2 with negative correlation.

3.2.1 Position of the optimum

Here and elsewhere in this document, the position of the optima has been estimated as the environmental location (E1 and E2 values) for which the rate is maximum.

3.2.2 Response diversity calculation - first scenario (low mean values of E1 and E2)

3.3 Fluctuation in environmental change - positive correlation

Increasing variance in z1 and z2 - positive correlation between env variables (E1 and E2)

Same steps as before (3 communities with increasing diversity in z1 while z2 is fixed), but the correlation between E1 and E1 is positive

3.3.1 Response diversity calculation

3.4 Fluctuation in environmental change - no correlation

Increasing variance in z1 - no correlation between env variables (E1 and E2)

Same steps as before (3 communities with increasing diversity in z1 while z2 is fixed), but there is no correlation between E1 and E1

3.4.1 Response diversity calculation

3.5 Preparing data set

4 Equal effect of temperature and salinity on species growth rate.

Now, we repeat the same steps as in the first part of the analysis, but with temperature and salinity having the same effect on species’ growth rate.

4.1 fluctuation in environmental change - negative correlation

4.1.1 Community 1 - low diversity in z1.

Community 1, single species responses. (a) Species responses to the gradient of E1. Different colour lines show the dependency of the rate to the second environmental variable (E2). (b) Species responses to the gradient of E2. Different colour lines show the dependency of the rate to the second environmental variable (E1).

(#fig:plotcomm1_neg1)Community 1, single species responses. (a) Species responses to the gradient of E1. Different colour lines show the dependency of the rate to the second environmental variable (E2). (b) Species responses to the gradient of E2. Different colour lines show the dependency of the rate to the second environmental variable (E1).

4.1.2 Community 2 - medium diversity in z1.

Community 2, single species responses. (a) Species responses to the gradient of E1. Different colour lines show the dependency of the rate to the second environmental variable (E2). (b) Species responses to the gradient of E2. Different colour lines show the dependency of the rate to the second environmental variable (E1).

(#fig:plotcomm2_neg1)Community 2, single species responses. (a) Species responses to the gradient of E1. Different colour lines show the dependency of the rate to the second environmental variable (E2). (b) Species responses to the gradient of E2. Different colour lines show the dependency of the rate to the second environmental variable (E1).

4.1.3 Community 3 - high diversity in z1.

 Community 3, single species responses. (a) Species responses to the gradient of E1. Different colour lines show the dependency of the rate to the second environmental variable (E2). (b) Species responses to the gradient of E2. Different colour lines show the dependency of the rate to the second environmental variable (E1).

(#fig:plotcomm3_neg1) Community 3, single species responses. (a) Species responses to the gradient of E1. Different colour lines show the dependency of the rate to the second environmental variable (E2). (b) Species responses to the gradient of E2. Different colour lines show the dependency of the rate to the second environmental variable (E1).

4.1.4 Position of the optimum

Here and elsewhere in this document, the position of the optima has been estimated as the environmental location (E1 and E2 values) for which the rate is maximum.

4.1.5 Response Capacity

4.1.6 Response diversity calculation - first scenario (low mean values of E1 and E2)

4.2 Fluctuation in environmental change - positive correlation

Increasing variance in z1 - positive correlation between env variables (E1 and E2)

Same steps as before (3 communities with increasing diversity ib z1 while z2 is fixed), but the correlation between E1 and E1 is positive

4.2.1 Response diversity calculation

4.3 Fluctuation in environmental change - no correlation

Increasing variance in z1 - no correlation between env variables (E1 and E2)

Same steps as before (3 communities with increasing diversity in z1 while z2 is fixed), but there is no correlation between E1 and E1

4.3.1 Response diversity calculation

4.4 Preparing data set

5 Variation in diversity in z1 and z2

Now we do the same, but having also z2 changing together with z1 with positive correlation. So, diversity in z1 and z2 are increasing gradually from low to high in the 3 communities.

5.1 Fluctuation in environmental change - negative correlation

Increasing variance in z1 and z2 - negative correlation between environmental variables (E1 and E2)

We now create 3 communities. Community 1 is characterized by low diversity in z1 and z2, community 2 has medium diversity in z1 and z2, and community 3 has high diversity in z1 and z2.

E1 and E2 have high fluctuations and negative correlation.

5.1.1 Community 1 - low diversity in z1.

Community 1, single species responses. (a) Species responses to the gradient of E1. Different colour lines show the dependency of the rate to the second environmental variable (E2). (b) Species responses to the gradient of E2. Different colour lines show the dependency of the rate to the second environmental variable (E1).

(#fig:plotcomm1_pos.1)Community 1, single species responses. (a) Species responses to the gradient of E1. Different colour lines show the dependency of the rate to the second environmental variable (E2). (b) Species responses to the gradient of E2. Different colour lines show the dependency of the rate to the second environmental variable (E1).

5.1.2 Community 2 - medium diversity in z1.

Community 2, single species responses. (a) Species responses to the gradient of E1. Different colour lines show the dependency of the rate to the second environmental variable (E2). (b) Species responses to the gradient of E2. Different colour lines show the dependency of the rate to the second environmental variable (E1).

(#fig:plotcomm2_pos.1)Community 2, single species responses. (a) Species responses to the gradient of E1. Different colour lines show the dependency of the rate to the second environmental variable (E2). (b) Species responses to the gradient of E2. Different colour lines show the dependency of the rate to the second environmental variable (E1).

5.1.3 Community 3 - high diversity in z1.

 Community 3, single species responses. (a) Species responses to the gradient of E1. Different colour lines show the dependency of the rate to the second environmental variable (E2). (b) Species responses to the gradient of E2. Different colour lines show the dependency of the rate to the second environmental variable (E1).

(#fig:plotcomm3_pos.1) Community 3, single species responses. (a) Species responses to the gradient of E1. Different colour lines show the dependency of the rate to the second environmental variable (E2). (b) Species responses to the gradient of E2. Different colour lines show the dependency of the rate to the second environmental variable (E1).

5.1.4 Response Capacity

5.1.5 Position of the optimum

Here and elsewhere in this document, the position of the optima has been estimated as the environmental location (E1 and E2 values) for which the rate is maximum.

5.1.6 Response diversity calculation - first scenario (low mean values of E1 and E2)

5.2 Fluctuation in environmental change - positive correlation

Increasing variance in z1 and z2 - positive correlation between env variables (E1 and E2)

Same steps as before (3 communities with increasing diversity in z1 while z2 is fixed), but the correlation between E1 and E1 is positive

5.2.1 Response diversity calculation

5.3 Fluctuation in environmental change - no correlation

Increasing variance in z1 - no correlation between env variables (E1 and E2)

Same steps as before (3 communities with increasing diversity in z1 while z2 is fixed), but there is no correlation between E1 and E1

5.3.1 Response diversity calculation

5.4 Preparing data set

6 Variation in diversity in z1 and z2

Now we do the same, but having also z2 changing together with z1 with negative correlation. So, diversity in z1 is increasing gradually from low to high in the 3 communities, while z2 decreases gradually in the 3 communities.

6.1 Fluctuation in environmental change - negative correlation

Increasing variance in z1 and z2 - negative correlation between env variables (E1 and E2)

We now create 3 communities. Community 1 is characterized by low diversity in z1 and high diversity in z2, community 2 has medium diversity in z1 and z2, and community 3 has high diversity in z1 and low in z2.

E1 and E2 have high fluctuations and negative correlation.

6.1.1 Community 1 - low diversity in z1.

Community 1, single species responses. (a) Species responses to the gradient of E1. Different colour lines show the dependency of the rate to the second environmental variable (E2). (b) Species responses to the gradient of E2. Different colour lines show the dependency of the rate to the second environmental variable (E1).

(#fig:plotcomm1_mix.1.2)Community 1, single species responses. (a) Species responses to the gradient of E1. Different colour lines show the dependency of the rate to the second environmental variable (E2). (b) Species responses to the gradient of E2. Different colour lines show the dependency of the rate to the second environmental variable (E1).

6.1.2 Community 2 - medium diversity in z1.

Community 2, single species responses. (a) Species responses to the gradient of E1. Different colour lines show the dependency of the rate to the second environmental variable (E2). (b) Species responses to the gradient of E2. Different colour lines show the dependency of the rate to the second environmental variable (E1).

(#fig:plotcomm2_mix.1.2)Community 2, single species responses. (a) Species responses to the gradient of E1. Different colour lines show the dependency of the rate to the second environmental variable (E2). (b) Species responses to the gradient of E2. Different colour lines show the dependency of the rate to the second environmental variable (E1).

6.1.3 Community 3 - high diversity in z1.

 Community 3, single species responses. (a) Species responses to the gradient of E1. Different colour lines show the dependency of the rate to the second environmental variable (E2). (b) Species responses to the gradient of E2. Different colour lines show the dependency of the rate to the second environmental variable (E1).

(#fig:plotcomm3_mix.1.2) Community 3, single species responses. (a) Species responses to the gradient of E1. Different colour lines show the dependency of the rate to the second environmental variable (E2). (b) Species responses to the gradient of E2. Different colour lines show the dependency of the rate to the second environmental variable (E1).

6.2 Response Capacity

6.2.1 Potential response diveristy across scenarios - here we prapre the data set used to campare the Response Capacity in the three different scenarios we created above. That is, we compare potential dissimilarity and divergence in communities changing only in z1, in communities changing in z1 and z2 with positive correlation, and communities changing in z1 and z2 with negative correlation.

6.2.2 Position of the optimum

Here and elsewhere in this document, the position of the optima has been estimated as the environmental location (E1 and E2 values) for which the rate is maximum.

6.2.3 Response diversity calculation - first scenario (low mean values of E1 and E2)

6.3 Fluctuation in environmental change - positive correlation

Increasing variance in z1 and z2 - positive correlation between env variables (E1 and E2)

Same steps as before (3 communities with increasing diversity ib z1 while z2 is fixed), but the correlation between E1 and E1 is positive

6.3.1 Response diversity calculation

6.4 Fluctuation in environmental change - no correlation

Increasing variance in z1 - no correlation between env variables (E1 and E2)

Same steps as before (3 communities with increasing diversity in z1 while z2 is fixed), but there is no correlation between E1 and E1

6.4.1 Response diversity calculation

6.5 Preparing data set

7 Plotting results

7.0.1 Response capacity

Potential response diversity

Figure 7.1: Potential response diversity

7.1 Summary plot - Directional Response diversity as Response Dissimilarity

Summary plot showing the effects of the determinants on directional response diveristy measured as Dissimilarity

Figure 7.2: Summary plot showing the effects of the determinants on directional response diveristy measured as Dissimilarity

7.2 Summary plot - Directional Response diversity as Response Divergence

Summary plot showing the effects of the determinants on directional response diveristy measured as Divergence (same as in the main manuscript

(#fig:SummaryPlot1.4)Summary plot showing the effects of the determinants on directional response diveristy measured as Divergence (same as in the main manuscript